<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>修改用户名</title>
    <link rel="stylesheet" href="css/m_ind.css">
<script type="text/javascript">
  function check(){
    var ftc = document.getElementById("af");
    if(ftc.oldn.value == ""){
      alert("请输入原用户名");
    } else if (ftc.newn.value == ""){
      alert("请输入新用户名");
    } else if (ftc.newn.value.length > 10){
      alert("用户名太长");
    } else {
      af.submit();
    }
  }
</script>
  </head>
  
  <body>
  <form action="Mrename" method="post" id="af" class="codrops-demos">
    <input type="text" placeholder="&nbsp;&nbsp;请填写用户原昵称" name="oldn" />
    <input type="text" placeholder="&nbsp;&nbsp;请填写新昵称" name="newn" />
    <a onClick="check();" >提交</a>
    <a href="master/index.jsp">返回</a>
</form>
<canvas id="canv"></canvas>
<script type="text/javascript" src="js/m_ind.js"></script>
  <h1 class="title">Rename</h1>
  </body>
</html>
